<template>
	<view class="all-box containers" style="margin-bottom:200rpx;">
		<view v-if="netWorkType!='none'">

			<view class="container tui-skeleton">
				<view class="flex-box prod-wrap">
					<view class="left">
						<view class="font16 bg-white padleft15 tab-item" v-for="(item,index) in data.property">
							{{item.name}}
						</view>
					</view>
					<view class="main">
						<view class="flex-box">
							<view class="padleft15" @click="selectEquip(item)" style="width: 30%;"  v-for="(item,index) in data.list">
								<image class="prod-img" :src="item.cover_image" mode="widthFix"></image>
								<view class="over-ellipsis font12">{{item.name}}</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 登录弹窗 -->
		<uni-popup-vlogin id="popupvLogin" ref="popupvLogin" type="bottom" />

	</view>
</template>
<script>
	import Vue from 'vue'
	import store from '@/store/index.js';
	// 公共底部
	import btabbar from '@/components/indexBottomTable/bottomtabbar.vue'
	import {
		mapGetters
	} from 'vuex';
	export default {
		components: {
			btabbar
		},
		computed: {
			//注册网络状态
			...mapGetters(['netWorkType','loginStatus'])
		},
		data() {
			return {
				data: {
					property:[],
					list: []
				}
			}
		},
		onLoad() {
			var that = this;
			
			

		},
		onShow() {
			this.getList()
		},
		methods: {
			getList() {
				let _this = this
				let opt = {
					url: '/product/getList',
			        method:'get',
					data: {
					
			
					},
					success: function(res) {
						// console.log(res)
						if (res.status == 1) {
							_this.data.property=res.data.property;
							_this.data.list=res.data.list;
							
						} else {
			
						}
			
					}
				};
				if (this.loginStatus) {
					this.$service.GetApi(opt) //网络
				}
			
			},
			selectEquip(row){
				let _this = this
				this.$refer.setVilit('/packageHealthy/pages/bind_equip/bind')
				let callback = function(url) {
					_this.$refs.popupvLogin.open()
				}
				var data = {
				
				}
				this.$refer.toUrl(callback, data)
				
				return
			}
			


		}
	}
</script>

<style lang="scss">
	@import "./equip.scss";
</style>
